<template>
  <web-view :src="url"></web-view>
</template>
<script>
import { mapState } from "vuex";
export default {
  data() {
    return {
      url: ""
    };
  },
  computed: {
    ...mapState(["userInfo"])
  },
  onLoad(options) {
    let url = decodeURIComponent(options.url);
    let separator = url.indexOf("?") > -1 ? "&" : "?";
    let userId = this.userInfo.id || 0;
    this.url = url + separator + "user_id=" + userId;
  }
};
</script>
